#{extends 'admin.html' /}
#{set title:'Administration : Creation d\'un Client' /}


<article class="module width_3_quarter" style="width:66%;">
    <header><h3 class="tabs_involved"></h3>
        <ul class="tabs">
            <li><a href="@{Customers.list}">Liste des Clients</a></li>
            <li><a href="Users.edit(entityUser.id)">Modifier l'utilisateur</a></li>

        </ul>
        <div class="clear"></div>
    </header>
    <div class="tab_container">
        <div id="tab1" class="tab_content">
            <table class="tablesorter" cellspacing="0">
                <tbody>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Groupe : </td>
                        <td style="font-size:16px;">${entityUser.groups}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Avatar : </td>
                        <td style="font-size:16px;">${entityUser.avatar}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Nom d'utilisateur : </td>
                        <td style="font-size:16px;">${entityUser.username}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Courier Electronique : </td>
                        <td style="font-size:16px;">${entityUser.email}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Date de Naissance : </td>
                        <td style="font-size:16px;">${entityUser.birthday.format()}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">Adresses : </td>
                        <td style="font-size:16px;">${entityUser.adress}</td>
                    </tr>
                    <tr>
                        <td style="font-size:14px;font-weight:bold;text-align:center;">N° de Téléphone : </td>
                        <td style="font-size:16px;">${entityUser.phonenumber}</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</article>
<br />
<article class="module width_3_quarter" style="width:66%;">
    <header><h3 class="tabs_involved">Information complementaire</h3>
        <div class="clear"></div>
    </header>

    <div class="entity">

        #{form @Customers.update(), id:'createForm'}
        <fieldset>
            <label>Date d'embauche : </label>
            <input type="text" name="entity.hiredate" value="${entity?.hiredate}"/>
            <span class="error">${errors.forKey('entity.hiredate')}</span>
        </fieldset>
        <fieldset>
            <label>Date de renvoie : </label>
            <input type="text" name="entity.firedate" value="${entity?.firedate}"/>
            <span class="error">${errors.forKey('entity.firedate')}</span>
        </fieldset>
        <fieldset>
            <label>Salaire : </label>
            <input type="text" name="entity.salary" value="${entity?.salary}"/>€
            <span class="error">${errors.forKey('entity.salary')}</span>
        </fieldset>
        <fieldset>
            <label>Heures : </label>
            <input type="text" name="entity.hours" value="${entity?.hours}"/>(H)
            <span class="error">${errors.forKey('entity.hours')}</span>
        </fieldset>
        <fieldset>
            <label>Photo d'identitié' : </label>
            <input type="text" name="entity.picture" value="${entity?.picture}"/>
            <span class="error">${errors.forKey('entity.picture')}</span>
        </fieldset>
        
        <input type="hidden" name="entity.id" value="${entity.id}" />
        <input type="hidden" name="entity.user.id" value="${entityUser.id}" />
        <input type="hidden" name="entity.user.groups.id" value="3"/>
    </div>
    <footer>
        <div class="submit_link">
            <input type="submit" name="submit" value="Enregistrer !" class="alt_btn"/>
        </div>
    </footer>

    #{/form}
</div>
</article>